package com.example.model;

import android.net.Uri;

import com.example.util.Util;

public class ContactModel {
	private String name;
	private String id;
	private String email;
	private String birthday;
	private String number;
	private int type;
	private Uri image;

	public ContactModel(String name, String id, String email, String birthday,
			String number, int type, Uri image) {
		super();
		this.name = name;
		this.id = id;
		this.email = email;
		this.birthday = birthday;
		this.number = number;
		this.type = type;
		this.image = image;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "ContactModel [name=" + name + ", id=" + id + ", email=" + email
				+ ", birthday=" + birthday + ", number=" + number + ", type="
				+ type + ", image=" + image + "]";
	}

	/**
	 * @return the id
	 */
	public String getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(String id) {
		this.id = id;
	}

	/**
	 * @return the email
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * @param email the email to set
	 */
	public void setEmail(String email) {
		this.email = email;
	}

	/**
	 * @return the birthday
	 */
	public String getBirthday() {
		return birthday;
	}

	/**
	 * @param birthday the birthday to set
	 */
	public void setBirthday(String birthday) {
		this.birthday = birthday;
	}

	/**
	 * @return the number
	 */
	public String getNumber() {
		return number;
	}

	/**
	 * @param number the number to set
	 */
	public void setNumber(String number) {
		this.number = number;
	}


	/**
	 * @return the type
	 */
	public int getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(int type) {
		this.type = type;
	}

	public String getItemToString()
	{
		String temp = "";
		if(!Util.checkNullString(name))
		{
			temp += "Name: " + this.name + "\n";
		}
		if(!Util.checkNullString(email))
		{
			temp += "Email: " + this.email + "\n";
		}
		if(!Util.checkNullString(birthday))
		{
			temp += "Birthday: " + this.birthday + "\n";
		}
		if(!Util.checkNullString(number))
		{
			temp += "Phone number:" + this.number;
		}
		
		return temp;
	}
	
	public ContactModel()
	{
		
	}

	/**
	 * @return the image
	 */
	public Uri getImage() {
		return image;
	}

	/**
	 * @param image the image to set
	 */
	public void setImage(Uri image) {
		this.image = image;
	}
	
}
